Fix the unexpected confirmation dialog in 'Create from *' #6990
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The dialog that alerts 'The form has not been submitted yet, do you really want to leave?' (introduced in #6566) will appear even if the user clicked the 'Upload' or 'Deploy' button and the request is successful. This pull request fixes the unexpected confirmation dialog in the 'Create from file', 'Create from form', and 'Create from input' components.
The
this.create_.createContent()
function navigates to the/overview
page before it returns, but thethis.creating_
variable will be changed tofalse
after the function returns. Therefore, theCanDeactivateGuard
guard will prevent the navigation.The solution is to include a
bypassGuard
state in the navigation ofthis.create_.createContent()
function to let it bypass theCanDeactivate
guard.